1. Field of the Invention
The present invention relates in general to an apparatus for recognizing and extracting pattern features which uses a two-dimensional laser pattern for three-dimensional measurement, and relates in particular to an apparatus for inspecting external appearance, extracting configurational features for synthesis of robot trajectory generation, and to an associated two-dimensional laser pattern generating device.
2. Technical Background
According to "Three-dimensional Image Measurement" by Iguchi and Sato, Shokodo Publishing Co., or to an English text, "Three Dimensional Machine Vision" by Takeo Kanade, the following measurement methods have been known:
(1) methods wherein slit beams are projected; PA1 (2) methods wherein regular patterns (for example, checks) are projected; and PA1 (3) methods wherein ring patterns are projected PA1 (a) mechanisms using rotation mirrors PA1 (b) mechanisms using cylindrical lens PA1 (c) mechanisms scanning a laser beam in a circle PA1 (d) mechanisms using x-y scanning-type mirrors.
The methods wherein ring patterns are projected are further categorized according to the mechanism used for the projection of the patterns, as follows:
Applications of Sensors with Spot or Slit Beam to Robots
Spot beam and slit beam sensors are used for robot welding (Japanese Patent Application First Publication No. 59(1974)-223817 "Microvector Control Method for Rim and Joint Follow Up" and "Example of Application of Sensor System for Robot Welding," Sekino, Welding Association Journal, [1991] Vol.60[1]: pp74-80). There are many examples of sensor systems to generate a robot trajectory in accordance with the features of the targeted configuration (see FIGS. 28A through 28C).
The end effector of the robot arm in FIG. 25 is equipped with a tool 100, a slit beam range sensor 101, and a two-dimensional position detection circuit 102. The robot independently determines a welding line, such as an L-shaped or V-shaped configuration, and moves along the determined feature. These systems convert the three-dimensional position Pc, which is observed by the coordinate system c fixed to the sensor 101, into a three dimensional position Pp, observed by the coordinate system p fixed to the robot as Pp=TPc. The conversion matrix T is determined by the position and orientation of the origin of the coordinate system c.
Two Dimensional Laser Pattern Generation Devices
FIG. 27 shows a conventional device for generating a two-dimensional laser ring pattern with the use of a rotation mirror. This device comprises a He-Ne laser 111, rotation mirrors 112 and 113, a lens 114, and a CCD imaging element 115. The rotation mirrors 112 and 113 deflect the laser beam LB emitted by the He-Ne laser 111 in the direction of qx and qy. The beam is directed at an object not indicated in the illustration. The scattered reflected light of the laser beam LB is applied to the object and forms an image at the CCD imaging element 115 via the lens 114. The image is used to determine the shape of the object. The light axis 116 of the lens 114 does not generally correspond to the radiation direction of the laser beam LB toward the object, because of the requirement for triangulation of the point illuminated by the laser beam LB.
FIGS. 28A to 28C explain the behavior of a scanning laser beam of a two-dimensional laser beam device shown in FIG. 27. In FIGS. 28A to 28C; z is the light axis of the laser beam, x shows the direction of deflection by the rotation angle qx of rotation mirror 112, y indicates the direction of deflection by the rotation angle qy of the rotation mirror 113, z.sub.1 is the position of the rotation mirror 112, z.sub.2 is the position of the rotation mirror 113, and z.sub.3 and z.sub.4 indicate the directions of the laser beam LB. In FIG. 28C, a and b show a deflection patterns traced by the laser beam in the x-y plane at positions z.sub.3 and z.sub.4. Although the pattern c traced at the position z.sub.3 is circular, the pattern b at position z.sub.4 is oval. This is caused by the difference in the distances between the mirrors and the object.
Applications of Sensors with Spot or Slit Beam for Robot
Robots which use conventional spot beams or slit beams utilize a pre-determined position or a position separated at a fixed distance in order to determine the welding points and the direction of the robot movement. Such robots cannot follow the changes in some configurations. For example, as shown in FIG. 26, the robot is unable to weld an object having an acute change in the angle. The feature images produced by the spot beam or slit beam are determined by two-dimensional image processing. The extracted features depend on heuristic image processing technique, thus requiring adjustment of the image processing parameters. This process takes a long time and requires a large amount of memory for one image.
Conventional two-dimensional laser pattern generating devices have the following problems.
(1) In a conventional device, shown in FIGS. 28A through 28C, the qx-qy directions of the rotation mirrors 112 and 113 do not coincide. Therefore, the change in the rotation angle for the two rotation mirrors must be large to obtain a circular deflection pattern trace. The deflection pattern trace becomes circular at a particular distance of the light axis while at other distances it becomes oval (see FIGS. 28A to 28C). When the pattern generated by the laser beam changes with the distance between the laser generation point and the object, triangulation produces a result indicating as though the orientation of the object's surface with respect to the light axis has changed. This resulted in measurement errors.
(2) These two-dimensional laser pattern generating devices are installed on positions such as the end effector of the robot's movable arm, together with observation equipment for projected patterns, and are used to inspect external appearances and to control work positioning. If the device operates while moving, the mechanical elements are subjected to acceleration, producing vibration in the support materials and movable mirrors of the rotation mirrors 112 and 113 in FIGS. 28A to 28C. The external forces created by the imbalance in the support point and the center of gravity for the support material and movable mirror causes unexpected mirror rotation. The stresses in the support material result in mirror translation and rotations in directions other than the correct rotation direction. Accurate pattern projection is impossible when the laser pattern is deformed by mechanical parts being subjected to such vibrations. Operating speed is reduced as observation and measurement cannot be conducted until the vibrations stop.
(3) The deflection producing structure is arranged so that the two rotation mirrors 112 and 113 cause deflections in the direction qx and qy. If such a large optical system is installed on the arm of a small robot, it will lower the robot arm's rigidity.